package org.explugin;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.fileTypes.LanguageFileType;
import org.jetbrains.annotations.NotNull;

public class ExSupportLoader implements ApplicationComponent {

    public void initComponent() {
        ApplicationManager.getApplication().runWriteAction(new Runnable() {
            public void run() {
                FileTypeManager.getInstance().associateExtension(ExFileType.getInstance(), ExFileType.getInstance().getDefaultExtension());
            }

        });
    }

    public void disposeComponent() {
    }

    @NotNull
    public String getComponentName() {
        return "ExSupportLoader";
    }

}
